package com.lixh.sdk.base.util

import androidx.compose.runtime.Stable
import androidx.compose.ui.Modifier

@Stable
fun Modifier.select(modifier: Modifier, predicate: () -> Boolean): Modifier {
    return if (predicate()) this.then(modifier)
    else this
}

@Stable
fun Modifier.ifElse(modifier: Modifier, modifier1: Modifier, predicate: () -> Boolean): Modifier {
    return if (predicate()) this.then(modifier)
    else this.then(modifier1)
}
